package com.example.homework1.controller;

import java.util.Random;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
public class RandomController {

    @GetMapping("/random")
    public int random(){
        java.util.Random random = new java.util.Random();
        int randomInt = random.nextInt(1000);
        return randomInt;
    }
}
